package com.yonyou.sto.modules.ims.service;

import com.yonyou.sto.common.api.CommonResult;
import com.yonyou.sto.modules.ims.dto.ImsInvoiceItemParam;
import com.yonyou.sto.modules.ims.model.ImsInvoiceItem;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author aegon
 * @since 2020-09-15
 */
public interface ImsInvoiceItemService extends IService<ImsInvoiceItem> {

    /**
     * 增加单据明细
     *
     * @param imsInvoiceItemParams
     */
    boolean createBatchInvoiceItem(String billId, List<ImsInvoiceItemParam> imsInvoiceItemParams);

    /**
     * 根据收款单id查询单据明细
     *
     * @param collect
     * @return
     */
    List<ImsInvoiceItem> listByBillIds(List<String> collect);

    /**
     * 更新单据明细
     *
     * @param invoiceItem
     * @return
     */
    CommonResult replace(ImsInvoiceItem invoiceItem);

    /**
     * 更新单据明细
     *
     *
     * @param 
     * @param params
     * @return
     */
    boolean updateBatchInvoiceItem(String id, List<ImsInvoiceItemParam> params);

    /**
     * 根据
     * @param ids
     */
    List<ImsInvoiceItem> listByManualIds(List<String> ids);

    CommonResult addItem(String manualId, String billSn);

    CommonResult deleteItem(String itemId);

    /**
     * 根据开票通知获取明细
     * @param billId
     * @return
     */
    List<ImsInvoiceItem> listByBillId(String billId);

    boolean updateStatusApply(String id, String name, String code, int billType, double applyje,int status,int contain);

    CommonResult merge(List<String> id);

    CommonResult create(ImsInvoiceItem invoiceItem);

    CommonResult delete(List<String> ids);
    CommonResult deleteApply(String username,List<String> ids);
}
